#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
public:
    vector<int> findNumbersWithSum(vector<int>& nums, int target) {
        unordered_set<int>s;
        for (int x : nums)
        {
            if (s.count(target - x)) return { target - x, x };
            else s.insert(x);
        }
    }
};